#
# Copyright (C) [2024] Xingyun Integrated Circuit, Inc.
#
# GreenCode was a private technology asset of Xingyun Integrated Circuit， Inc （Confidential） (the "License");
#  Author: Shawn.Tan
#  Date : 2025.10.28
#
# History: Initial Version 2025.10.28
#

export GREEN_CC ?= g++
PYVER != python3 --version | sed -n -e 's/Python \(3\.[[:digit:]]\+\)\..*/\1/p'
export GREEN_PYTHON_VER ?= $(PYVER)

# this really ought to use pkg-config - there could be more than one include
# directory.
export GREEN_PYTHON_INC ?= /usr/include/python$(GREEN_PYTHON_VER)
export GREEN_PYTHON_LIB ?= /usr/lib/x86_64-linux-gnu/

all:
	@$(MAKE) gpgpu
	
#@$(MAKE) fpix

.PHONY: gpgpu
gpgpu:
	@cd gpgpu; $(MAKE)


#.PHONY: fpix
#fpix:
#	@cd fpix; $(MAKE)

.PHONY: tests
tests:
	@rm -fr output
	@cd gpgpu; $(MAKE) tests

#@cd utils/regression/seedgen; $(MAKE) all

.PHONY: enums
enums:
	@cd utils/enum_classes; python3 ./create_enum_files.py

.PHONY: handlers
handlers:

.PHONY: clean
clean:
	@cd gpgpu; $(MAKE) clean
	
#@cd gpgpu; $(MAKE) clean
#@cd fpix; $(MAKE) clean
#@cd utils/regression/seedgen; $(MAKE) clean
